package javafx.demo.pane;

import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import javafx.scene.text.FontWeight;
import javafx.scene.text.Text;
import javafx.stage.Stage;

public class TestVBox extends Application {

	public static void main(String[] args) {
		launch(args);
	}

	@Override
	public void start(Stage stage) {
		stage.setTitle("TitledPane");
		Scene scene = new Scene(new VBox(), 400, 250);
		scene.setFill(Color.GHOSTWHITE);

		VBox vbox = new VBox();
		vbox.setPadding(new Insets(10, 10, 10, 10));
		vbox.setSpacing(10);

		Text title = new Text("Data");
		title.setFont(Font.font("Amble CN", FontWeight.BOLD, 14));
		vbox.getChildren().add(title);

		Text options[] = new Text[] { new Text("  Sales"), new Text("  Marketing"), new Text("  Distribution"),
				new Text("  Costs") };

		for (int i = 0; i < 4; i++) {
			vbox.getChildren().add(options[i]);
		}

		BorderPane border = new BorderPane();
		border.setLeft(vbox);

		VBox root = (VBox) scene.getRoot();
		root.getChildren().addAll(border);
		stage.setScene(scene);
		stage.show();
	}

}
